//strings.groovy


println '----'

multiline = """
    this is
    a multi-line
    string
    """
println multiline

println '----'

multiline = '''\
    this is
    a revised multi-line(no heading nor tailing empty line)
    string\
    '''
println multiline

println '---'

multiline = '\
this is\
 a revised single-line\
string'

println multiline

// 单字符字符串和字符可以比较
println 'c' == (char) 'c'
// 数字字符问题
println '1'.charAt(0) as int  // this same with (int)'1' in java ==> 49
println ('1'.charAt(0) - (char) '0') // ==> 1
